
import tracker from '../util/tracker';




// 检测白屏的原理就是取屏幕中间的横/纵两条线上的各九个点的元素
export function blankScreen() {
    const wrapperSelectors = ['body', 'html', '#container', '.content'];
    let emptyPoints = 0;
    function isWrapper(element) {
        let selector = getSelector(element);
        if (wrapperSelectors.indexOf(selector) >= 0) {
            emptyPoints++;
        }
    }
    let xElements, yElements;
    for (let i = 1; i < 9; i++) {
        xElements = document.elementsFromPoint(window.innerWidth*i/10,window.innerHeight/2) //获取横坐标上的9个点
        yElements = document.elementsFromPoint(window.innerWidth / 2, window.innerHeight * i / 10) //获取纵坐标上的9个点
        isWrapper(xElements[0]); //获取x轴第一个点
        isWrapper(yElements[0]); //获取y轴第一个点
    }
}